package stringexercise;

public class subString {
    public static void main(String[] args) {
        String str="www.tedu.cn.com";
        int start=str.indexOf(".")+1;//4
        System.out.println(start);
        int end=str.indexOf(".",start);//8
        String subStr=str.substring(start,end);
        System.out.println(subStr);
    }
}
